<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

if ($g4['https_url']) {
    $login_url = $_GET['url'];
    if ($login_url) {
        if (preg_match("/^\.\.\//", $url)) {
            $login_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $login_url));
        }
        else {
            $purl = parse_url($g4[url]);
            if ($purl[path]) {
                $path = urlencode($purl[path]);
                $urlencode = preg_replace("/".$path."/", "", $urlencode);
            }
            $login_url = $g4[url].$urlencode;
        }
    }
    else {
        $login_url = $g4[url];
    }
}
else {
    $login_url = $urlencode;
}
?>

<script type="text/javascript" src="<?=$g4[path]?>/js/capslock.js"></script>
<form name="flogin" method="post" onsubmit="return flogin_submit(this);" autocomplete="off">
<input type="hidden" name="url" value='<?=$login_url?>'>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><table width="860" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="17">&nbsp;</td>
      </tr>
      <tr>
        <td align="right"><a href="#"><img src="../img/comm/smenu01.gif" alt="" width="29" height="12" border="0" /></a>
        <img src="../img/comm/smenu_line.gif" width="2" height="12" hspace="7" />
        <a href="./register.php"><img src="../img/comm/smenu_join.gif" width="38" height="12" border="0" /></a></td>
      </tr>
      <tr>
        <td height="22">&nbsp;</td>
      </tr>
      <tr>
        <td height="115" align="center" valign="top"><a href="/"><img src="../img/comm/logo.gif" width="302" height="71" border="0" /></a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="1"bgcolor="DCDCDC"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="188" align="center" valign="top"><table width="644" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="50" colspan="5">&nbsp;</td>
        </tr>
      <tr>
        <td width="142" height="40" align="right"><img src="../img/seoul/login_tit01.gif" width="50" height="22" hspace="10" /></td>
        <td width="6">&nbsp;</td>
        <td align="left"><input name="mb_id" id="mb_id" type="text" class="box2" id="textfield" itemname="아이디" required minlength="2" maxLength=20 /></td>
        <td align="left">&nbsp;</td>
        <td width="240" rowspan="2" align="left"><INPUT type=image src="../img/seoul/login_bt.gif" width="89" height="84" /></td>
      </tr>
      <tr>
        <td align="right"><img src="../img/seoul/login_tit02.gif" width="59" height="22" hspace="10" /></td>
        <td>&nbsp;</td>
        <td width="230"><input name="mb_password" id="login_mb_password" type="password" class="box2" maxLength=20 itemname="패스워드" required onkeypress="check_capslock(event, 'login_mb_password');"/></td>
        <td width="26" align="center">&nbsp;</td>
        </tr>
      <tr>
        <td height="80" colspan="5" align="center"><table width="55%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="33%" height="30"><img src="../img/seoul/login_txt01.gif" width="203" height="22" /></td>
            <td width="44%"><a href="./register.php"><img src="../img/seoul/login_bt01.gif" width="93" height="22" border="0" /></a></td>
          </tr>
          <tr>
            <td height="30"><img src="../img/seoul/login_txt02.gif" width="203" height="22" /></td>
            <td><a href="javascript:;" onclick="win_password_lost();"><img src="../img/seoul/login_bt02.gif" width="93" height="22" border="0" /></a></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
</form>



<script type='text/javascript'>
document.flogin.mb_id.focus();

function flogin_submit(f)
{
    <?
    if ($g4[https_url])
        echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
    else
        echo "f.action = '$g4[bbs_path]/login_check.php';";
    ?>

    return true;
}
</script>
